package com.airline.action;

import java.io.PrintWriter;
import java.rmi.RemoteException;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.json.simple.JSONArray;
import org.json.simple.JSONObject;

import com.airline.beans.Employee;
import com.airline.connection.AirlineSystemServiceProxy;
import com.airline.form.SearchEmployeeForm;
import com.airline.form.SearchListEmployeesForm;

public class SearchEmployeeAction extends Action{
	
	AirlineSystemServiceProxy proxy = new AirlineSystemServiceProxy();
	public ActionForward execute(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response)
			throws Exception {
		
		
		SearchEmployeeForm searchForm = (SearchEmployeeForm)form;
		
		Employee searchEmp = searchForm.getEmp();
		
		HttpSession sess = request.getSession();
		
		sess.setAttribute("searchemp", searchEmp);
		
		return mapping.findForward("success");
		
		
		
		
	}

	
	
	

}
